Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / Advanced Printing Features Reference
Functions / Working With QuickDraw GX Print Files


GXInsertPrintFilePage

You can use the GXInsertPrintFilePage function to insert a new page in a print file.

void GXInsertPrintFilePage (gxPrintFile aPrintFile, 
      long atPageNumber, gxFormat pageFormat, gxShape pageShape);
aPrintFile
A reference to the print file object in whose file you want to insert a page.
atPageNumber
The page to insert.
pageFormat

A reference to a format object for the inserted page.
pageShape
A reference to a picture shape object for the inserted page.
DESCRIPTION
The GXInsertPrintFilePage function inserts a page in a print file before the page number that you specify in the atPageNumber parameter. You can pass a value of 1 in this parameter to insert the new page before all other pages in the print file. When you pass a value that is higher than the current page count, QuickDraw GX appends the page to the end of the print file.

Any changes you make to a print file are not permanent until you save the print file object by calling the GXSavePrintFile function.

SPECIAL CONSIDERATIONS
After you call the GXInsertPrintFilePage function, do not change the page format or page shape referenced by the pageFormat and pageShape parameters. For example, if you want to change the format or shape later, make a copy, and modify the copy. Dispose of the original page or format after you make the copy.

For speed and memory efficiency, dispose of the references to the format and page parameters immediately after you call GXInsertPrintFilePage.

If a format or page can be reused, passing a clone of the object to the function is more efficient than passing a copy. For example, you can pass a clone of a page or format to replicate a page or format already in the file. The cloned object may be one that you have previously read from a print file or one that you created.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
To save a print file object, see the description of the GXSavePrintFile function on page 4-70.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help